{% extends 'default/base.html' %}
{% block content %}
    {% load el_pagination_tags %}
    {% paginate product_obj_list %}
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-lg-10">
            <h2>产品线列表 | Assets List.</h2>
        </div>
        <div class="col-lg-2">
        </div>
    </div>
    <style>
        .wrapper {
            margin-top: 10px;
        }

        .wanghui {
            margin-top: 10px;
        }
    </style>
    <div class="wrapper">
        <div class="row">
            <div class="ibox float-e-margins">
                <div id="result">
                    <div class="ibox-content">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th>名称</th>
                                <th>别名</th>
                                <th>项目</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {% for product_obj in product_obj_list %}
                                <tr>
                                    <td class="col-lg-3">
                                        {{ product_obj.name }}
                                    </td>
                                    <td class="col-lg-3">
                                        {{ product_obj.slug }}
                                    </td>
                                    <td class="col-3">
                                        ddd
                                    </td>

                                    <td class="col-lg-3">
                                        <div class="wanghui">
                                            <a href="{% url 'product_lines_update' pk=product_obj.pk %}"
                                               class="btn btn-xs btn-info">修改</a>
                                            {#    <a href="/assets/server/type/del/{{ i.pk }}/" type="button" class="btn btn-xs btn-danger">删除</a>#}
                                        </div>
                                    </td>
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>

                        <div class="row">
                            <div class="col-sm-6">
                                {% if request.user.is_superuser or request.session.fun_auth.add_line_auth %}
                                    <a href="{% url 'product_lines_create' %}" type="button"
                                       class="btn btn-info">添加产品线</a>
                                {% endif %}
                            </div>
                        </div>

                        <div class="voilet_page">
                            {% show_pages %}
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>

{% endblock %}
